Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate metadata by iterating on DefId instead of traversing the HIR tree 1/N #80919

Merged
merged 13 commits into from
Jan 24, 2021

Conversation

cjgillot
Copy link
Contributor

Sample from #80347.

@rust-highfive
Copy link
Collaborator

r? @oli-obk

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 11, 2021
@cjgillot
Copy link
Contributor Author

cjgillot commented Jan 11, 2021

Just encoding spans:
@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@bors
Copy link
Contributor

bors commented Jan 11, 2021

⌛ Trying commit 8a5ed78a766e6e1cba22b262cc54ef2999777801 with merge cd92c1a693aa7a1500ea987e9e722ccbf163b786...

@bors
Copy link
Contributor

bors commented Jan 11, 2021

☀️ Try build successful - checks-actions
Build commit: cd92c1a693aa7a1500ea987e9e722ccbf163b786 (cd92c1a693aa7a1500ea987e9e722ccbf163b786)

@rust-timer
Copy link
Collaborator

Queued cd92c1a693aa7a1500ea987e9e722ccbf163b786 with parent a2cd91c, future comparison URL.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 11, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (cd92c1a693aa7a1500ea987e9e722ccbf163b786): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 11, 2021
@cjgillot
Copy link
Contributor Author

Perf is neutral.

@oli-obk
Copy link
Contributor

oli-obk commented Jan 12, 2021

Ok, so it's not the additional iteration of def ids or the additional query invocations, that's good to know at least. I guess now we need to find out which queries that you are caching this way cause the regression. Maybe add half of your commits, let's see if it has the regression. If it has, remove half the newly added commits and try again.. that should give us the culprit(s) fairly quickly

@petrochenkov
Copy link
Contributor

Spans were previously queried and encoded for all DefIds anyway, so this PR doesn't make much difference.
I'd rather be interested in seeing results for some (preferably expensive) query that was previously executed only for some small subset of DefIds.

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@cjgillot
Copy link
Contributor Author

Just modifications to the queries.
@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@bors
Copy link
Contributor

bors commented Jan 12, 2021

⌛ Trying commit 596e4c803e7a0883ecccdbd3090239aceb4218af with merge d79a05ac22b5f71ab8f204dc69f27692d5d443f3...

@bors
Copy link
Contributor

bors commented Jan 12, 2021

☀️ Try build successful - checks-actions
Build commit: d79a05ac22b5f71ab8f204dc69f27692d5d443f3 (d79a05ac22b5f71ab8f204dc69f27692d5d443f3)

@rust-timer
Copy link
Collaborator

Queued d79a05ac22b5f71ab8f204dc69f27692d5d443f3 with parent 497c9a2, future comparison URL.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 12, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (d79a05ac22b5f71ab8f204dc69f27692d5d443f3): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 12, 2021
@cjgillot
Copy link
Contributor Author

Iterator on non-MIR queries.
@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@bors
Copy link
Contributor

bors commented Jan 12, 2021

⌛ Trying commit d1b8abb8572c84855caa94d8088ad901006d064f with merge af7c9fb243263a146c0204f0c9673b6f8b2c7090...

@cjgillot
Copy link
Contributor Author

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Jan 23, 2021

📌 Commit 97ee7c7 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 23, 2021
@bors
Copy link
Contributor

bors commented Jan 23, 2021

⌛ Testing commit 97ee7c7 with merge 6ac46f1e51db8999af302e7ecf99c54ed82f4505...

@bors
Copy link
Contributor

bors commented Jan 23, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 23, 2021
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v2'
##[warning]Failed to download action 'https://api.github.com/repos/actions/checkout/zipball/5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f'. Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
##[warning]Back off 10.814 seconds before retry.
##[warning]Failed to download action 'https://api.github.com/repos/actions/checkout/zipball/5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f'. Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
##[warning]Back off 14.118 seconds before retry.
##[error]A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

@cjgillot
Copy link
Contributor Author

Spurious failure.
@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 23, 2021
@bors
Copy link
Contributor

bors commented Jan 24, 2021

⌛ Testing commit 97ee7c7 with merge 85e355e...

@bors
Copy link
Contributor

bors commented Jan 24, 2021

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 85e355e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 24, 2021
@bors bors merged commit 85e355e into rust-lang:master Jan 24, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 24, 2021
@cjgillot cjgillot deleted the defkey-span branch January 24, 2021 11:18
@rylev
Copy link
Member

rylev commented Jan 26, 2021

@cjgillot @oli-obk It seems there was some perf regressions due to this pull request as you can see here that already were present in the one of the perf runs above. Any thoughts on this regressions and if we need to look into addressing them?

@oli-obk
Copy link
Contributor

oli-obk commented Jan 27, 2021

We're now encoding more things in metadata and thus also causing more query invocations. We need to do a general analysis to find out what needs to go into metadata and what not. This is work we need do independently of this PR. Until then... maybe we can figure out what caused this specific regression in def_span runs and try to exclude these from being done?

@rylev
Copy link
Member

rylev commented Jan 28, 2021

@oli-obk I think it would also be acceptable to wait on addressing the issue until it can be looked at holistically, but I'd just be worried that it will never get looked at. If you think adding an issue to look into this a later point will actually lead to the issue being addressed, I'm fine with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants